Apparatus, method and computer program product for processing document images of various sizes and orientations

ABSTRACT

The image forming apparatus receives image data based on multiple document images of various sizes and/or orientations. The apparatus identifies areas that are not yet assigned with document images on a single sheet of paper and identifies whether any document image can be laid out in an identified area. In another aspect of the apparatus, a maximum document image size is detected from multiple document images, and a scale factor is calculated to cause the detected maximum size match with the size of the entire area of the paper or an area obtained by dividing the paper into equal parts. In another aspect of the apparatus, a scaling factor is calculated for each document image to cause the size of the particular document match with the size of an area obtained by dividing the paper into equal parts.

This application is a divisional of application Ser. No. 09/729,351,filed on Dec. 5, 2000, which is based on and claims priority under 35U.S.C. §119 with respect to Japanese Patent Application No. 11-347750filed on Dec. 7, 1999, Japanese Patent Application No. 11-374672 filedon Dec. 28, 1999, and Japanese Patent Application No. 11-374673 filed onDec. 28, 1999. The entire contents of the prior applications isincorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus, method and computerprogram product for processing document images of various sizes andorientations.

2. Description of Related Art

A technology called “N-in-1 (N-up)” has also been known wherein N piecesof, or N pages of document images (where N is a positive integer equalto or larger than 2) to be arranged on one sheet of paper usingconventional digital copiers and printers. This technology of printingN-pages of document on a single sheet of paper (“N-in-1 printing”)allows us to view N-pages of document images at a glance and to savepaper.

However, in performing the N-in-1 printing of multiple document imagesof various sizes using conventional image forming systems, it sometimesoccurs that a portion of the images does not fit into the area of thesheet causing an image loss as a result. On the other hand, if the sheetsize is changed depending on the size of each document image in order toprevent image losses, finishing processes such as stapling and punchingbecome difficult because of the lack of uniformity in the paper size. Assuch, there has been no technology to perform the N-in-1 printing ofmultiple document images of various sizes and/or orientations. Moreover,in printing multiple document images of various sizes and/ororientations, it is preferable to process them in such a way that theprinted matters are easier to read for the benefits of the user.

SUMMARY OF THE INVENTION

An object of this invention is to provide an image-processing apparatus,method and computer program product as well as an image formingapparatus that enables to print multiple document images of varioussizes and/or orientations preventing any loss of document images andarranging them in easily viewable layouts.

According to an aspect of this invention, an image processing apparatuscomprises a receiving unit for receiving image data based on multipledocument images of various sizes and/or orientations, and a processingunit for processing the received document data so that the multipledocument images can be printed on a sheet of paper, wherein theprocessing unit comprises an identifying unit for identifying an areawhich is not yet covered with document images, and a judging unit forjudging whether new document image or images can be laid out in thearea.

According to another aspect of the invention, an image processing methodcomprises a receiving step for receiving image data based on multipledocument images of various sizes and/or orientations, and a processingstep for processing the received document data so that the multipledocument images can be printed on a sheet of paper, wherein theprocessing step comprises an identifying step for identifying an areawhich is not yet covered with document images, and a judging step forjudging whether new document image or images can be laid out in thearea.

According to still another aspect of the invention, a computer programproduct for image processing comprises a receiving step for receivingimage data based on multiple document images of various sizes and/ororientations, and a processing step for processing the received documentdata so that the multiple document images can be printed on a sheet ofpaper, wherein the processing step comprises an identifying step foridentifying an area which is not yet covered with document images, and ajudging step for judging whether new document image or images can belaid out in the area.

According to a further aspect of the invention, an image formingapparatus comprises a receiving unit for receiving image data based onmultiple document images of various sizes, a detecting unit fordetecting a maximum size of document images based on the received imagedata, a selecting unit for selecting paper with a size equal to orlarger than the detected maximum size, and a forming unit for formingimages based on the image data on the selected paper.

According to a still further aspect of the invention, An image formingapparatus comprises a receiving unit for receiving image data based onmultiple document images of various sizes, a detecting unit fordetecting a maximum size of document images based on the received imagedata, a calculating unit for calculating a scaling factor that causesthe detected maximum size to match with the size of a print area, aprocessing unit for scaling up or down the sizes of the document imagesbased on the calculated scaling factor, and a forming unit for formingimages based on the processed image data on the print area.

According to a yet further aspect of the invention, an image processingmethod comprises a receiving step for receiving image data based onmultiple document images of various sizes, a detecting step fordetecting a maximum size of document images based on the received imagedata, a calculating step for calculating a scaling factor that causesthe detected maximum size to match with the size of a print area, and aprocessing step for scaling up or down the sizes of the document imagesbased on the calculated scaling factor.

According to a yet further aspect of the invention, a computer programproduct for image processing comprises a receiving step for receivingimage data based on multiple document images of various sizes, adetecting step for detecting a maximum size of document images based onthe received image data, a calculating step for calculating a scalingfactor that causes the detected maximum size to match with the size of aprint area, and a processing step for scaling up or down the sizes ofthe document images based on the calculated scaling factor.

According to a yet further aspect of the invention, an image formingapparatus comprises a receiving unit for receiving image data based onmultiple document images of various sizes, a detecting unit fordetecting the size of each document image based on the received imagedata, a calculating unit for calculating a scaling factor that causesthe detected size of each document image match with the size of a printarea obtained by dividing the paper into equal parts, a processing unitfor scaling up or down the sizes of each document image based on eachcorresponding calculated scaling factor, and a forming unit for formingeach image based on the processed image data in each print area obtainedby dividing the paper into equal parts.

According to a yet further aspect of the invention, an image processingmethod comprises a receiving step for receiving image data based onmultiple document images of various sizes, a detecting step fordetecting the size of each document image based on the received imagedata, a calculating step for calculating a scaling factor that causesthe detected size of each document image match with the size of a printarea obtained by dividing the paper into equal parts, and a processingstep for scaling up or down the sizes of each document image based oneach corresponding calculated scaling factor.

According to a yet further aspect of the invention, a computer programproduct for image processing comprises a receiving step for receivingimage data based on multiple document images of various sizes, adetecting step for detecting the size of each document image based onthe received image data, a calculating step for calculating a scalingfactor that causes the detected size of each document image match withthe size of a print area obtained by dividing the paper into equalparts, and a processing step for scaling up or down the sizes of eachdocument image based on each corresponding calculated scaling factor.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is the schematic diagram of an image forming system to which thepresent invention is applied;

FIG. 2 is the block diagram of the digital copying machine shown in FIG.1;

FIG. 3 is the constitutional diagram of the memory shown in FIG. 2;

FIG. 4 is a diagram showing a job list;

FIG. 5 is the block diagram of the print server shown in FIG. 1;

FIG. 6 is the block diagram of each client shown in FIG. 1;

FIG. 7 is a drawing showing an example of the software configurationwithin the hard disk shown in FIG. 6;

FIG. 8 is a diagram showing a specific example of multiple documentimages of various sizes and orientations;

FIG. 9 is a flowchart showing the contents of the copying process on adigital copying machine;

FIG. 10A and FIG. 10B show a flowchart showing an example of the imagelayout process corresponding to the first embodiment of the invention;

FIG. 11 is a diagram showing a layout example based on the process shownin FIG. 10A and FIG. 10B;

FIG. 12 is a diagram showing another layout example based on the processshown in FIG. 10A and FIG. 10B;

FIG. 13 is a drawing showing a Z-folded printed matter;

FIG. 14 is a drawing showing a stapled printed matter;

FIG. 15 is a drawing showing a specific example of the display screen ofthe printer driver in the first embodiment of the present invention;

FIG. 16A and FIG. 16B are flowcharts showing the process content of theclient in FIG. 1 when an image layout is processed with the printdriver;

FIG. 17 is a flowchart showing the process content of the print servershown in FIG. 1 when an image layout is processed in the print server;

FIG. 18 is a flowchart showing the process content of the digitalcopying machine shown in FIG. 1 when an image layout is processed in thedigital copying machine;

FIG. 19 is a flowchart showing an example of image layout processcorresponding to the second embodiment of the present invention;

FIG. 20 is a drawing showing an example of image layout based on theprocess shown in FIG. 19;

FIG. 21A and FIG. 21B are another example of image layout processcorresponding to the second embodiment of the present invention;

FIG. 22 is a diagram for describing the standard print areas where thesheet is divided into equal parts;

FIG. 23 is a diagram showing layout examples based on FIG. 21A and FIG.21B;

FIG. 24A and FIG. 24B are flowcharts showing yet another example ofimage layout process corresponding to the second embodiment of thepresent invention;

FIG. 25 is a diagram showing an example of image layout based on theprocess shown in FIG. 24A and FIG. 24B;

FIG. 26 is a diagram for describing image layout process correspondingto the third embodiment of the present invention;

FIG. 27 is a diagram for describing image layout process correspondingto the third embodiment of the present invention when the orientation ofthe document image is different from that of FIG. 26;

FIG. 28A and FIG. 28B show a flowchart showing an example of imagelayout process corresponding to the third embodiment of the presentinvention;

FIG. 29 is a drawing showing an example of image layout based on theprocess shown in FIG. 28A and FIG. 28B;

FIG. 30 is a drawing showing another example of image layout based onthe process shown in FIG. 28A and FIG. 28B;

FIG. 31 is a drawing showing yet another example of image layout basedon the process shown in FIG. 28A and FIG. 28B; and

FIG. 32 is a diagram showing a specific example of the display screen ofthe printer driver in the third embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Preferred embodiments of the invention will be described below referringto the accompanying drawings.

First Embodiment

In the image processing corresponding to the first embodiment, the imagedata is processed in such a way as to arrange multiple document imageson a single sheet of paper. The feature of this image processing is thatit identifies areas where no document images are laid out yet on a sheetof paper and judges whether any new document image can be laid out.

FIG. 1 shows the constitution of the network image forming system towhich this invention is applied. In this image forming system, a digitalcopying machine 100, a print server computer (“print server”) 20,multiple client computers (“clients”) 30 a, 30 b, 30 c, and 30 d areinterconnected by a network 40. As a result, data communication of imagedata and various commands can be exchanged between the clients 30 athrough 30 d and the print server 20 as well as between the clients 30 athrough 30 d. The digital copying machine 100 is not only capable ofmaking copies of the document, but also is capable of printing imagedata received from other equipment such as the clients 30 a through 30 dvia the print server 20.

FIG. 2 is a block diagram of the control system of the digital copyingmachine shown in FIG. 1. The digital copying machine 100 has thefollowing constitution as shown in FIG. 2. An image-scanning unit 101scans documents and forms image data based on the captured documentimages. An ADF (automatic document feeder) 102 feeds multiple sheets ofdocument automatically one sheet at a time. A document status detectionsensor 103 detects the size and orientation of the document being read.An external interface unit 104 connects the digital copying machine 100to the print server 20. The operating panel 105 is used for inputtingvarious setup. A memory 106 stores programs and data. Animage-processing unit 107 provides image processing to the processedimage data. A printer engine 108 prints out the processed image data onpaper. A multi-stage paper-feeding unit 110 supplies multiple kinds ofsheets with various sizes and orientations. A CPU 109 controls all ofthese units 11 through 18.

For the digital copying machine 100 to function as a copying machine,the CPU 109 controls various parts based on instructions from theoperating panel 105. More specifically, the document is scanned on theimage-scanning unit 101. The printer engine 108 prints the receivedimage data on paper. The copying process is conducted based on thecopying condition (paper size, scaling factor, number of copies,density, double/single side printing, N-in-1, sort/non-sort, etc.).

For the digital copying machine 100 to function as a printing machine,the image data transmitted by the clients 30 a through 30 d are receivedwith the printing condition through the external interface 104 via theprints server 20. The printer engine 108 prints the received image data.The printing condition and the copying condition as well as the imagedata are controlled together as a job. The jobs include copy jobs thatare jobs when the digital copying machine 100 functions as a copyingmachine and the printing jobs that are jobs when the digital copyingmachine 100 functions as a printing machine.

The memory 106 consists of a ROM (read only memory) and a RAM (randomaccess memory), which are not shown in the drawing. The ROM stores thecontrol program. The RAM has an image memory part 16 a that stores theimage data and a control data memory part 16 b that stores the controldata as shown in FIG. 3. The control data is a control table that storesthe setup contents of the printing/copying condition and the currentprocessing condition. This control table consists of a job control tablethat controls jobs, a paper supply port control table that controls theinformation of paper supply cassettes, etc. The job control tableincludes the printing/copying conditions being set up and informationconcerning the image data storage places.

The operating panel 105 comprises the operating keys such as a start keyand a ten-key pad as well as a touch screen display. The display is usedfor displaying detailed contents of the printing conditions for thecurrent job or displaying the job list. The user can switch between theprinting condition display and the job list display. The job list showsthe contents of each job and its progress status. FIG. 4 shows the casewhen the job list is displayed. In case of FIG. 4, it displays for eachjob the title of the job (copy job/print job), the status(printing/waiting), the total number of pages, the number of copies, andwhether the N-in-1 printing is setup (o/x).

FIG. 5 is a block diagram of the control system of the print server 20shown in FIG. 1. The print server 20 has the following constitution,which is shown in FIG. 5. A CPU 21 controls the entire print server 20.A memory 22 and a hard disk 23 store programs and data. A networkinterface 24 connects the print server 20 to the network 40. Animage-processing unit 25 applies image processing to the image data asdescribed later. A display 26 displays various screens. An input unit 27comprises a keyboard and/or a mouse. A media read unit 28 reads out thedata stored in various recording media such as floppy disks, CD-ROMs,etc. An interface 29 connects the print server 20 to the digital copyingmachine 100.

FIG. 6 is the block diagram of each of the clients 30 a through 30 d.For the convenience sake, a typical client is shown here with thereference number 30. The client 30 has a basic structure similar to thatof the print server 20. The client 30 comprises a CPU 31, a memory 32, ahard disk 33, a network interface 34, an image-processing unit 35, adisplay 36, an input unit 37, and a media read unit 38. The networkinterface 34 connects the client 30 to the network 40.

FIG. 7 shows an example of the software configuration within the harddisk shown in FIG. 6. A hard disk 33 has a document forming application33 a and a printer driver 33 b installed. The document formingapplication 33 a is, for example, word processing software. The printerdriver 33 b is a program that controls a digital copying machine 100when the digital copying machine 100 functions as a printer. The usercan set up a desired printing condition using the printer driver 33 bwhen the user prints a document prepared and/or edited using thedocument preparing application 33 a. The printer driver 33 b preparesprint jobs based on specified printing conditions. Prepared print jobsare transmitted from the client 30 to the digital copying machine 100via the network 40 and the print server 20.

The image forming system simplifies the printing process of multipledocument images of various sizes and/or orientations. FIG. 8 shows aspecific example of document images of various sizes and orientationsthat the image forming system corresponding to the present invention canhandle. The first and second document images shown in FIG. 8 are of theA4 size. The third document image is a graphic image of the B5 size. Thefourth document image is a table of the A3 size.

The image forming system that corresponds to the first embodimentreceives image data based on multiple document images of various sizesand/or orientations from the image scanner 101. Then it processes thedata in such a way as to be able to print multiple document images on asingle sheet of paper. More specifically, it first identifies areas ofthe sheet that are not yet assigned with document images (“unassignedareas”). Next, it judges whether it is possible to lay out new documentimages in the unassigned areas. If no new document image or images arefound to be able to be laid out on the unassigned areas, the newdocument image or images are laid out on another sheet.

More specifically, the first selected document image is laid out on asheet of paper that corresponds to the first page. The second selecteddocument image is laid out on an area of the first sheet, where thefirst document image is not laid out. The third selected document imageis laid out on an area of the first sheet, where neither the first imagenor the second image is laid out. Similarly, the fourth selecteddocument is laid out on an area of the same sheet of paper as long as itis possible to do so. Thus, as many document images as possible are laidout on a single sheet of paper in this invention. Preferably, multipledocument images are arranged adjacent to each other. Multiple images arearranged in such a way as to minimize gaps between document images.

According to the process of the first embodiment, the N-in-1 process ismade possible wherein multiple document images (of multiple pages) aresynthesized to form a new output image data. According to theconventional N-in-1 process, the number of document images that can bearranged on a single sheet of paper is limited to two even if threedocument images can be physically laid out on the sheet once the numberof document images to be laid out is set to two. On the contrary,according to the present invention, three document images are laid outon a single sheet of paper as long as it is physically possible to layout three document images. The process of laying out document images andforming output document image data in such a manner (“image layoutprocess”) is executed on the memory 106.

The contents of the process for the digital copying machine outlined inthe above are described in the following in two separate cases, i.e., acase where the digital copying machine executes copying and a case whereit executes printing.

<Copying Process>

FIG. 9 is a flowchart that shows the contents of copying process bymeans of the digital copying machine. The CPU 109 of the digital copyingmachine 100 receives the copying condition instructed by the operatingpanel 105 (S1). The copying condition contains instructions such aspaper size, scaling factor, density, double/single side, N-in-1,sort/non-sort, etc. The received copying condition is stored in thecontrol data memory part 16 b. The CPU 109 judges whether the copy jobcan be executable on the digital copying machine 100 based on the copycondition. If the copy job is executable, it informs the operating panel105 the approval of the acceptance of the copy job. When it is approved,the operating panel 105 changes the display. As a result, the acceptanceof the copy job will be displayed (S2).

When the start key of the operating panel 105 is pressed, the ADF 102feeds the document one sheet at a time to the image scanner unit 101.The image scanner unit 101 forms the document image data by scanning thedocuments that are fed to it (S3). The document image data that areobtained by scanning are stored in the image memory part 16 a. Adocument status detection sensor 103 detects the size and orientation ofeach document (S4). The detected size and orientation are stored in thecontrol data memory part 16 b.

The image-processing unit 107 refers to the copying condition stored inthe control data memory part 16 b. The image-processing unit 107executes the image layout process (S5). More specifically, theimage-processing unit 107 edits the document image data so that itcoincides with the referred copying condition, and forms a new outputimage data. As a result, image losses can be prevented as mentionedbefore, the size of the output paper size becomes uniform, and printedmatters become easier to read. The output image data that are newlyformed are spooled at the image memory 16 a (S6). The control datamemory part 16 b stores the data indicating each job's progress statusas a control table.

When the printing start request is made (S7), a judgment is made whetherthe printing should be approved (S8). More specifically, the progressstatus of the previous print job at the digital copying machine 100 isjudged by referencing the control table. If the newly accepted job isexecutable immediately, the start of printing is approved (S8: YES).Consequently, the printer engine 108 starts printing (S9). On the otherhand, if it is decided that the printing cannot be started immediatelydue to such a reason that the previous print job is in progress, etc.(S8: NO), the printing will be withheld until the printing start isapproved (S9). After the printer engine 108 executes the printing, thefinisher (not shown) can perform finishing processes such as paperfolding, stapling, and punching processes.

The content of the image layout process that is characteristic of thepresent embodiment is described below. FIG. 10A and FIG. 10B are theflowcharts that indicate the contents of the image layout process inmore detail, which will be described at the step S5 of the flowchart ofFIG. 9. The image layout process can be executed on the memory 106. Morespecifically, the data area that corresponds to the area of a singlesheet of output paper is set up on the memory 106. Multiple documentimages will be laid out on this data area and the output image data willbe formed.

The CPU 109 refers to the copying condition stored in the control datamemory part 16 b (S101). The processing is executed as follows if it isdetermined that the N-in-1 printing is to be executed as a result of thereference (S102). There is no need to set up the number of documentimages to be laid out in the area of a single sheet of paper in advancein case of the processing according to the first embodiment. In otherwords, a proper process will be automatically selected form the N-in-1print, such as the 2-in-1 print where two document images are laid outin the area of a single sheet of paper, the 3-in-1 print where threedocument images are laid out in the area of a single sheet of paper, the4-in-1 print where four document images are laid out in the area of asingle sheet of paper, etc. In some cases, the 1-in-1 print is selected,where only one document image is laid out in the area of a single sheetof paper.

The size of the entire area on the paper is identified by referencingthe data about the paper size stored as a part of the copying conditionat the control data memory part 16 b. As a result, the area on the firstsheet of paper is set up (S103).

If there is no instruction about the paper size is included in thecopying condition, the paper size can be selected as follows. Thedocument status detection sensor 103 detects the document size andorientation based on the document image data received. The CPU 109determines the size of the largest document image among the multipledocument images based on the detection result. The CPU 109 selects apaper size equal or larger than the size of the detected paper.

Next, the counter value C concerning the order of the document image isset to 1 (S104). As shown in the succeeding FIG. 10B, theimage-processing unit 107 lays out the first document within the areasof the first sheet of the paper (S105). In reality, the image-processingunit 107 writes the document image on the data area that corresponds toa single sheet of the paper specified in the memory 106. Theimage-processing unit 107 lays out document images as densely aspossible in order to save the paper as much as possible. For example,the document-processing unit 107 can lay out the first document image insuch a way as to cause it to abut with a corner or edge of the area ofthe paper. The image-processing unit 107 can also lay out alternativelyin such a way as to leave a specified narrow space between the firstdocument image and a corner or edge of the area on the paper.

A judgment is made at this point as to whether there are any documentimages yet to be laid out in the received document image data (S106). Ifit is judged as a result that there is no more document image to be laidout (S106: NO), other ancillary image processes are done (S107) tocomplete image layout processes. On the other hand, if it is judged thatthere are document images yet to be laid out (S106: YES), the value C ofthe counter is incremented by 1 to make C=2 (S108).

The image-processing unit 107 identifies the size of the second documentimage. The image-processing unit 107 also identifies the unassignedarea. The unassigned area at the time when the first document image islaid out is the entire area of the first sheet of paper minus the areawhere the first document image is laid out. The image-processing unit107 compares the size of the second document image to be laid out andthe size of the unassigned area (S109). If it is determined as a resultof the comparison that the second document image can be printed withinthe unassigned area, the image-processing unit 107 will lay out thesecond document image in the unassigned area (S110, S111). In otherwords, the image-processing unit 107 will lay out the second documentimage in the unassigned area of the first sheet of paper if the seconddocument image can be laid out in the unassigned area without causingany loss of the image.

The image-processing unit 107 can also lay out the second document imagein such a way as to abut with the first document image laid out in theprevious layout. In other words, the image-processing unit 107 can layout multiple document images without leaving any spaces between them incertain directions. For example, it can lay out multiple document imageswithout leaving any spaces between them in the upward and leftwarddirections. The image-processing unit 107 can lay out multiple documentimages abutting each other. Alternatively, the image-processing unit 107can lay out the document images leaving a certain space between thealready laid out document images and the one being laid out this time.

The image-processing unit 107 compares the size of the C-th documentimage to be laid out and the unassigned area at that point, i.e., thearea that has not been laid out with the document images of the firstthrough the (C-1)-st document images. If the C-th document image can beprinted within the unassigned area without causing any image loss (S110:YES), the image-processing unit 107 lays out the C-th document image inthe unassigned area (S111). On the other hand, if it is determined as aresult of the comparison that the C-th document image cannot be printedin the unassigned area of the first sheet of paper (S110: NO), in otherwords, the C-th document image does not fit within the unassigned areaand causes an image loss, the image processing unit 107 will lay out theC-th document image on another paper area (area on the second sheet ofpaper in this case) (S112, S105). As a result, it is finalized that thefirst through the (C-1)-st document images are to be laid out on thefirst sheet of paper. In other words, the first through (C-1)-stdocument images will be synthesized to form a new image data. Byrepeating the similar processes, document images will be laid outsequentially on the second and the following sheets to form the outputimage data.

When all documents are laid out (S106: YES), the image-processing unit107 executes other image processes such as spacing setup (S107).Specifically, the image-processing unit 107 adjusts the distancesbetween the edges and the document images and/or the distances betweenmultiple document images to be laid out on the sheets of paper as a partof the ancillary processes.

More specifically, documents may be laid out in an unbalanced status inthe area of the sheet before the processes of the step S107. Asmentioned before, the document images are laid out without leaving anyspaces between them in the upward and leftward directions in thisembodiment. This provides a more effective use of the uncovered spaceand increases the probability of laying out a new document image in theuncovered space. However, despite the effort of optimizing the uncoveredspace by laying out the documents leaving no spaces between them in theupward and leftward directions, it may not be able to lay out the newdocument image in the uncovered space in some cases. This may leave thedocument images laid out in an unbalanced condition in the area of thesheet. In order to avoid the document images left in an unbalancedcondition, the document-processing unit 107 can rearrange the layout ofthe document images in a more balanced manner as a final adjustment.

FIG. 11 and FIG. 12 are the example layouts based on the processes shownon FIG. 10A and FIG. 10B. FIG. 11 shows an example of laying outdocument images on the A3 size paper in a horizontal position(“landscape”). The document images shown in FIG. 11 consist of the firstdocument image of the A4 size, the second document image of the A4 size,the third document image of the B5 size, the fourth document image ofthe A5 size, the fifth document image of the B4 size, and the sixthdocument image of the A3 size. The orientation of all the documentsshown in FIG. 11 is vertical (portrait). The first document image is thefirst selected document image, and is normally the image on the firstpage of the document. The same rule applies to the second and the imagesthereafter.

The size of the first document image in this case is A4. No documentimage is laid out on the first sheet of paper in the beginning. Theentire area of the first sheet of paper is thus the unassigned area.Therefore, the first document image will be laid out in this area of thepaper. The image-processing unit 107 tries to lay it out as closely aspossible to the leftward and upward edges of the area. Thus, the firstdocument image will be laid out in the left half of the paper. As aresult, the unassigned area of the first sheet of paper becomes the arealeft by subtracting the area where the first document image of the A4size is laid out from the entire area of the A3 size paper (right halfof the area of the sheet).

The size of the second document image is A4. Since the second documentimage can be laid out in the unassigned area of the first sheet ofpaper, it will be laid out on the unassigned area. This leaves nounassigned area on the first sheet of paper (the size of the unassignedarea becomes zero). The third document image of the B5 size cannot beprinted within the unassigned area of the first sheet of paper. Thethird document image will be laid out in another area of paper, i.e.,the area of the second sheet of paper. As a result, the unassigned areaof the second sheet becomes the area obtained by subtracting the areawhere the third document image of the B5 size is laid from the entirearea of the A3 size paper.

The size of the fourth document image is A5. Since the fourth documentcan be printed in the unassigned area of the second sheet of paper, itis laid in the unassigned area. As a result the unassigned area of thesecond sheet paper becomes the area obtained by subtracting the areawhere the third document image of the B5 size and the fourth documentimage of the A5 size are laid from the entire area of the A3 size paper.The image-processing unit 107 can lay out the fourth document in such away as to abut the third document.

The size of the fifth document image is B4. The fifth document imagecannot be printed in the unassigned area of the second sheet ofdocument. Therefore, the fifth document image is laid out in the area ofthe third sheet of paper. As a result, the unassigned area on the thirdsheet of paper becomes the area obtained by subtracting the area wherethe fifth document image of the B4 size is laid from the entire area ofthe A3 size paper. The size of the sixth document image is A3. As aresult, the sixth document image is laid out in the area of anotherpaper, i.e., in the area of the fourth sheet of paper. Thus, all thedocument images are laid out to complete the output image datapreparation.

FIG. 12 shows a case of laying out document images on the A3 size paperin the landscape orientation. The document images shown in FIG. 12consist of the first document image of the B6 size, the second documentimage of the A5 size, the third document image of the B6 size, and thefourth document image of the A3 size. The orientation of all thedocument images shown in FIG. 12 is portrait.

The size of the first document image is B6. No document image is laidout on the first sheet of paper in the beginning. The entire area of thefirst sheet of paper is thus the unassigned area. Therefore, the firstdocument image is laid out in this area of the paper. Theimage-processing unit 107 tries to lay it out as closely as possible tothe leftward and upward edges of the area. As a result, the unassignedarea of the first sheet of paper becomes the area left by subtractingthe area where the first document image of the B6 size is laid out fromthe entire areas of the A3 size paper.

The size of the second document image is A5. Since the second documentimage can be laid out in the unassigned area of the first sheet ofpaper, it is laid out on the unassigned area. As a result, theunassigned area of the first sheet becomes the area obtained bysubtracting the area where the first document image of the B6 size andthe second document image of the A5 size are laid out from the entirearea of the A3 size paper.

The size of the third document image is B6. The third document image canbe laid out in the uncovered area of the first sheet of paper.Therefore, the third document image is laid out in this unassigned area.As a result, the unassigned area of the first sheet becomes the areaobtained by subtracting the area where the first document image of theB6 size, the second document image of the A5 size, and the thirddocument image of the B6 size are laid out from the entire area of theA3 size paper.

The size of the fourth document image is A3. The fourth document imagecannot be printed within the unassigned area of the first sheet ofpaper. Therefore the fourth document image is laid out in another areaof paper, i.e., the area of the second sheet of paper. Thus, thepreparation of the new image data is completed. As a result, the first,second and third document images are laid out on the first sheet ofpaper. In other words, the first, second and third document images aresynthesized to form a new single page of output image data.

Moreover, the digital copying machine 100 according to the presentembodiment can provide the following finishing processes.

FIG. 13 is a drawing showing a Z-folded printed matter. The Z-folding isa process of folding a printed sheet of paper at the midpoint of thelonger side and then folding in the opposite direction. The digitalcopying machine 100 according to this embodiment can provide the sameZ-folding to all sheets, as the output sheet size will be uniform.

FIG. 14 is a drawing showing a stapled printed matter. The sheetsprocessed with the Z-folding, etc., can be stapled using staples 70 asthe last process. The digital copying machine 100 can provide thepunching process to the printed sheets, where punched holes are producedon the sheets, instead of the stapling process. As the output sheet sizeis uniform, stapling and punching can be easily done.

<Printing Process>

Not only when the digital copying machine functions as a copying machineas described above, but also when the digital copying machine functionsas a printer, a process similar to the image layout process mentionedabove can be executed. More specifically, when the digital copyingmachine 100 is used as a printer, the image layout process can beexecuted on either the printer driver of the client 30 a through 30 d,the print server 30, or the digital copying machine 100. Each of thosecases will be described below.

<In Case the Image Layout Process is Executed on the Printer Driver>

In case the image layout process is to be executed on the printerdriver, the image layout process is completed at the clients 30 athrough 30 d where the printer drivers are installed.

FIG. 15 shows an example of the display screen of the printer driver.FIG. 16A and FIG. 16B are the flowcharts that indicate the operation ofthe clients 30 a through 30 d.

Multiple document images of various sizes and/or orientations areprepared by means of the document forming application 33 a. After that,as the printer driver's starts up (S11: YES), the status information isobtained from the print server 20 (S12). On the same screen where theprinting conditions such as paper size, paper feed port, and double sideprinting are setup, the N-in-1 mode is also instructed (S13). When theprint is instructed (S14: YES), each client 30 a˜30 d prepares a printjob, which consists of the document image data and the information ofthe specified print condition. The prepared print job will be registeredto the job control table on the memory 32 (RAM) or on the hard disk 33(S15). The document image data is stored on the image memory part 16 asimilar to the constitution of FIG. 3. On the other hand, the printcondition is stored in the control table within the control data memorypart 16 b. The image data outputted from the printer driver is normallyprepared in the page description language rather than bitmap.

In FIG. 16B that follows, the document image data is rasterizedaccording to the instructed printing condition (S16). Rasterization is aprocess of developing image data into bitmap data. When therasterization is completed, each client 30 a˜30 d executes the imagelayout process shown in FIG. 10 (S17). After that, the rasterized andimage layout processed document image data is spooled to the memory 22or the hard disk 23 (S18). Each client 30 a˜30 d demands theregistration of the print job to the print server 20 and (S19), waitsfor the print server 20 to approve the registration of the print job(S20: YES), and transmits the print job (document image data and theprinting condition) to the print server 20 (S21). As a result, the imagelayout processed image data is transmitted to the digital copyingmachine 100 via the print server 20. The digital copying machine 100that functions as a printer, prints out based on the received imagedata.

<In Case the Image Layout Process is Executed on the Print Server>

In case the print server executes the image layout process, the imagelayout process is completed on the print server based on the documentimage data received from the client.

FIG. 17 is a flowchart showing the operation of the print server 20 incase the print server 20 executes the image layout process. The printserver 20 receives the print condition from a certain client 30 a˜30 d(S31). When it judges that the print job is acceptable, the print server20 notifies the particular client 30 a˜30 d that the print job isacceptable (S32), and receives the document image data from the client30 a˜30 d.

The document image data received from the client 30 a˜30 d is rasterizedaccording to the instructed printing condition (S34). When therasterization is completed, the print server 20 executes the imagelayout process shown in FIG. 10A and FIG. 10B (S35). After that, therasterized and image layout processed document image data is spooled tothe memory 22 or the hard disk 23 (S36). The print server 20 requeststhe digital copying machine 100 to register the printing job (S37). Whenthe digital copying machine 100 approves the printing job registration(S38: YES), and the print job including the spooled document image datais transmitted to the digital copying machine 100 (S39).

<In Case the Image Layout Process is Executed on the Digital CopyingMachine>

In case the digital copying machine executes the image layout process,the image layout process is done at the digital copying machine thatactually prints on the paper.

FIG. 18 is the flowchart that shows the operation of the digital copyingmachine 100 when the image layout process is done by the digital copyingmachine 100.

The digital copying machine 100 receives the printing condition from theprint server 20 (S41). If the print job is judged acceptable, thedigital copying machine notifies the print server 20 that the acceptanceof the print job is approved (S42), and receives the document image datafrom the print server 20 (S43). It is recognized that multiple documentimages of various sizes and/or orientations exist to be printed based onthe received document image data.

The document image data is rasterized according to the specifiedprinting condition (S44). When the rasterization is completed, thedigital copying machine 100 executes the image layout process shown inFIG. 10 (S45). After that, the rasterized and image layout processeddocument image will be spooled to the memory 106.

It requests the start of printing internally or to the user and entersinto the standby condition waiting for the printing to start (S47). Assoon as the printing start is approved (S48: YES), the digital copyingmachine 100 starts to print (S49).

Although it was assumed that the single side printing is instructed as apart of the copying condition or the printing condition in the abovedescriptions, the image processing method of this embodiment can beapplied to cases where the double sided printing is instructed as a partof either the copying condition or the printing condition. In case thedouble sided printing is instructed, document images are laid out in theareas that correspond to the front and rear sides respectively. Morespecifically, the unassigned area is identified for the front area wheredocument images are not laid out yet to determine if a new documentimage can be laid out in the unassigned area. If the new document imagecan be laid out in the unassigned area, the document image will be laidout in the unassigned area. On the other hand, if the new document imagecannot be laid out in the unassigned area, the document image will belaid out in the area of the backside of the paper.

The process in this embodiment is applicable not just to document imagesof various sizes and/or orientations. In such a case, it is notdifferent from the conventional N-in-1 printing in so far as generatingthe output image data by means of synthesizing multiple document images.However, in the conventional N-in-1 printing, the area on the printingpaper is divided into equal parts and only one document image is laidout in each equally sized part. On the centrally, the image processingmethod according to this embodiment identifies the unassigned area,which is the area on the paper not laid out with document images, andmakes a judgment whether any documents can be laid out in the unassignedarea, so that it is possible to freely lay out and print document imageswithout depending on any prescribed formats such as equal divisions ofthe area of the paper.

Furthermore, as described above, there is no need to preset the numberof document images on a sheet of paper as in the case of theconventional N-in-1 printing, and the number of document images laid outon a sheet of paper is automatically determined, so that a layout can bemade to maximize the number of document images per sheet of paperautomatically. As a result, the chance of optimizing the use of the areaof paper is greater compared to the convention N-in-1 printing.

According to this embodiment, document images are laid out aftercomparing each selected document image one by one with the unassignedarea, which is the area of the sheet of paper not laid out with documentimages, image loss can be prevented even when the N-in-1 printing isexecuted with multiple document images of various sizes and/ororientations. It also makes the output paper size uniform, thus makingthe finishing processes such as paper folding process and punchingprocess easier to execute. Moreover, since all the document images canbe scaled up or down with a common scaling factor, so that it makes thecharacter font sizes uniform and printed materials easier to read. Thismakes it different from the “fit to paper” processing that scales up ordown each document image of a different size to fit the uniform papersize.

Second Embodiment

In the image processing of the second embodiment, the size of thelargest document image is detected among multiple document images, andthe scaling factor is calculated to match the size of the largestdocument with the size of the standard print area. Once it isdetermined, all the document images are scaled up or down based on thecalculated scaling factor. The standard print area mentioned above canbe the entire area of a sheet of paper or alternatively one of theequally divided areas of the sheet.

The second embodiment is different from the first embodiment in thecontents of the image layout process. It is however the same as thefirst embodiment in all other points. Its components that function thesame as those in the first embodiment are assigned with the samecomponent numbers. This embodiment is applicable not only to the N-in-1printing but also in the conventional printing where only one documentimage is laid out in one sheet of paper.

The contents of the image layout process unique to the second embodimentare described below. The following description is based on, for example,a case where the document image is reduced and the reduced documentimage is laid out in the area. According to the document image layoutprocess in this embodiment, the size of the largest document imageidentified among the multiple document images to be printed is comparedwith the standard print area. The common scaling factor is calculatedbased on the comparison in such a way that the largest document fitswithin the standard print area. More specifically, if the entire area ofa sheet of paper is selected as the standard print area, the scalingfactor used commonly for all the documents to be printed is calculatedin such a way that the largest document image fits within the area ofthe sheet of paper. If the equally divided area is selected as thestandard print area, the common scaling factor is calculated in such away that the largest document image fits within the equally dividedarea.

<In Case the N-in-1 Printing is Not Executed>

FIG. 19 is a flowchart that shows an example of the image layout processthat corresponds to the second embodiment of the invention. FIG. 19shows the process of a case where the N-in-1 printing is not instructed.The image layout process for this embodiment can be executed on thememory 106 as in the case of the first embodiment.

The CPU 109 refers to the copying condition stored in the control datamemory part 16 b (S201). If it is judged that the N-in-1 printing is notinstructed as a result of the reference (S202: NO), it is processed asfollows.

The size of the largest document image is detected among the documentimages to be printed (S203). For example, the value of the largesdocument image size is searched from the data file of the size of eachdocument image stored in the control data memory part 16 b as adetection result of the document status detection sensor 103. As aresult of the search, the maximum document image size is detected. Ifthe document status detection sensor 103 itself is capable of detectingthe maximum document size from multiple documents, the maximum documentimage size can be detected using its output. For example, if the ADF 102is transporting multiple documents, the maximum document size can bedetected by adding an area sensor, etc., to the ADF 102. According tothis method, it becomes possible to detect the maximum document sizebefore all the documents are scanned so that the process can be speededup.

The size of the paper is identified by referring to the data concerningthe paper size stored n the control data memory part 16 b as a conditionof copying (S204). As a result, the size of the area of a sheet of paperis set up. If the N-in-1 printing is not instructed, the entire area ofthe sheet of paper is always the standard print area. If the paper sizeinstruction is not included in the copying condition, the size of thedocument, which is scanned first, can be set up as the paper size.

The maximum image size identified is then compares with the size of theentire area of the paper (i.e., the standard print are in this case)(S205). The common scaling factor will be calculated based on thecomparison (S206). More specifically, the scaling factor is calculatedso that the size of the maximum document image becomes equal or smallerthan the size of the entire area of the paper. For example, if themaximum document image size is the A3 size and the paper size is the A4size, the scaling factor used commonly for all the document images isset to 0.707 or smaller. In order to prevent the character fontsbecoming too small to be legible, it is preferable for the CPU 109 tocalculate the scaling factor in such a way as to make the maximumdocument image size equal to the size of the entire area of the paper.

The image-processing unit 107 reduces all the document images based onthe common scaling factor calculated as above (S207). In case of theprocessing example shown in FIG. 19, only one of the reduced documentimages is laid out on each sheet of paper (S208). It then checks whetherall the document images are laid out (S209). When all the documentimages are laid out (S209: YES), other image processes such as spacingare executed to complete the image layout process (S110).

FIG. 20 shows an example layout based on the process shown in FIG. 19.FIG. 20 shows the process of laying out the document images on paper ofthe A4 size in portrait orientation. Multiple document images shown inFIG. 20 consist of the first document image of the A4 size, the seconddocument image of the A5 size, the third document image of the A3 size,and the fourth document image of the A4 size. The orientation of all thedocuments shown in FIG. 20 is portrait.

First, it is detected that the size of the largest document image amongthe document images to be printed is the A3 size based on the output ofthe document status detection sensor 103. The size of the detectedlargest document image is compared with the size of the entire area ofthe paper (i.e., the size of the standard print area in this case). Thescaling factor is calculated in such a way that the size of the thirddocument image, which is the largest document image and is the A3 size,becomes the paper size, i.e., the A4 size. Consequently, the commonscaling factor is determined as 0.707. The image-processing unit 107reduces all the document images consisting of the first, second, thirdand fourth document images based on the calculated scaling factor 0.707.Each reduced document image is laid out on a sheet of paper by itself.

<In Case the N-in-1 Printing is Allowed and the Standard Print Area isthe Same as the Entire Area of the Paper>

FIG. 21A and FIG. 21B show a flowchart for another example of thedocument image layout process corresponding to the second embodiment ofthe invention. FIG. 21A and FIG. 21 B represent a case where the N-in-1printing is specified and the print area is the same as the entire areaof the paper. According to the process shown in FIG. 21A and FIG. 21B,the scaling factor is calculated the same way as in the process shown inFIG. 19. Moreover, the process shown in FIG. 21A and FIG. 21B isdifferent from the process shown in FIG. 19 in that it does not limitthe number of document images to one, but rather allows multipledocument images on a sheet of paper.

The CPU 109 refers to the copying condition stored in the control datamemory part 16 b (S301). If it is judged that the execution of theN-in-1 printing is instructed as a result of the reference (S302: YES),and the standard print area is specified as the entire area of a singlesheet of paper (S303: YES), it is processed as follows.

The size of the largest document image is detected among the documentimages to be printed similar to the case shown in FIG. 19 and thedetected size of the largest document image is compared with the size ofthe entire area of the paper (i.e., the standard print area in thiscase) (S304). The scaling factor will be calculated based on the resultof the comparison in such a way that the size of the maximum documentimage becomes equal or smaller than the size of the entire area of thepaper. More preferably, the scaling factor is calculated in such a wayas to make the maximum document image size equal to the size of theentire area of the paper (S305).

The image-processing unit 107 reduces all the document images based onthe calculated scaling factor (S306). The reduced document images arelaid out according to the following process.

The image-processing unit 107 identifies the area of a sheet of paperdividing it into multiply areas (subdivisions) as indicated in FIG. 21B(S307).

FIG. 22 shows an example of equally dividing the area of the sheet. InFIG. 22, the area 1 a of a sheet of paper is divided into two equalparts, subdivisions 2 a and 2 b, at the midpoint of the longer side. Thesubdivision 2 a is further divided into two equal parts, subdivisions 4a and 4 b, at the midpoint of its longer side. The subdivision 2 b isfurther divided into two equal parts, subdivisions 4 c and 4 d, at themidpoint of its longer side. As a result, the area 1 a is divided intofour equal parts 4 a, 4 b, 4 c and 4 d.

It is then judged if each of the reduced documents can fit into one ofthe subdivisions. It is tried to put each reduced document image into assmaller subdivision (subdivision of a larger dividing number) aspossible. However, it is possible to preset the maximum division numberM in the copying condition. For example, in case the maximum divisionnumber M=2 is preset, even if a reduced document image can be laid outinto a subdivision obtained by dividing the area 1A into four, it isstill laid out into a subdivision obtained by dividing it into two.

The process of laying out the reduced document images is described inthe steps following the step S308 in the flowchart shown in FIG. 21B.Here, it is assumed that the maximum division number is four.

When a reduced document image is to be laid out in a quadrant area,which is the minimum unit, it is judged whether the document image willoverflow the boundary of a quadrant area (S308). If the reduced documentimage does not overflow the quadrant area (S308: NO), the document islaid out in the quadrant area maintaining the original orientationwithout being rotated (S309). If the reduced document image overflowsthe boundary of the quadrant area (S308: YES), the document image isrotated 90 degrees to change the orientation (S310). It is then judgedif the 90 degrees rotation prevents it from extending beyond theboundary of the quadrant area (S311). If the document image does notoverflow the boundary of the quadrant area (S311: NO), the documentimage is laid out in the quadrant area (S309). On the other hand, if thedocument image still overflows the boundary of the quadrant area evenafter the rotation (S311: YES), the area used for the document image isexpanded (S312). More specifically, the area used for laying out thedocument image is expanded from a quadrant area to a bisection area. Ifthe document image cannot be laid out in a bisection area, the documentimage will be laid out using the entire area of the paper.

When all the document images are laid out (S313: YES), other imageprocesses, such as spacing, will be executed (S314) to complete theimage layout process.

FIG. 23 shows an example of the layout based on the process shown inFIG. 21A and FIG. 21B. The example shown in FIG. 23 is a case wheredocuments are laid out in the A4 size sheet in the landscapeorientation. Actual process is executed on the memory 106. The documentimages shown in FIG. 23 consist of the first document image of the A4size in the landscape orientation, the second document image of the A3size in the landscape orientation, the third document image of the A3size in the portrait orientation, the fourth document image of the A4size in the portrait orientation, and the fifth document image of the A5size in the portrait position. FIG. 23 shows a case where the maximumdivision number is two.

First, it is detected that the size of the largest document image amongthe document images to be printed is the A3 size based on the output ofthe document status detection sensor 103. The size of the detectedlargest document image is compared with the size of the entire area ofthe paper (i.e., the size of the standard print area in this case). Thescaling factor is calculated in such a way that the size of the largestdocument image, which is the A3 size, becomes the paper size, i.e., theA4 size.

The image-processing unit 107 reduces all the document images based onthe calculated scaling factor 0.707. The size of the reduced firstdocument image is A5. Therefore, the first document image is rotated 90degrees and laid out into a bisection area. The size of the reducedsecond document image is A4. Therefore, the second document image doesnot fit into the bisection area adjacent to the area where the firstdocument image is laid out. As a consequence, the reduced seconddocument is laid out into the area of the second sheet of paper. Thesize of the reduced third document image is A4. The reduced thirddocument image is rotated 90 degrees relative to the area of the sheet.As a result, the reduced third document image is laid out in the thirdsheet of paper. The size of the reduced fourth document image is A5.Therefore, the reduced fourth document image is laid out into thebisected area of the fourth sheet of paper. The size of the reducedfifth document image is A6. Therefore, the reduced fifth document imagecan be fit into the adjacent quadrant area by rotating it. However,since the maximum division number M=2, no layout for the quadrant areawill be considered. Therefore, the reduced fifth document image is laidout into the bisection area adjacent to the area where the fourthdocument image is laid out.

<In Case the N-in-1 Printing is Allowed and the Standard Print Area isan Area Obtained by Equally Dividing the Paper>

FIG. 24A and FIG. 24B show a flowchart for another example of the imagelayout processing corresponding to the second embodiment of theinvention. FIG. 24A and FIG. 24B show a case where the N-in-1 printingis specified and the standard print area is one of areas obtained byequally dividing the paper. The process shown in FIG. 24A and FIG. 24Balways prepare output document image data for printing out multipledocument images on a single sheet of paper.

CPU 109 refers to the copying condition stored in the control datamemory part 16 b (S401). If it is judged that the execution of theN-in-1 printing is instructed as a result of the reference (S402: YES),and an area obtained by equally dividing a sheet of paper is specifiedas the standard print area (S403: YES), it is processed as follows.

The size of the largest document image is detected among the documentimages and the detected size of the largest document image is comparedwith the size of the divided area of the paper (i.e., the standard printarea in this case) (S404). The scaling factor will be calculated basedon the result of the comparison in such a way that the size of themaximum document image becomes equal or smaller than the size of one ofthe divided area of the paper. More preferably, the scaling factor iscalculated in such a way as to make the maximum document image sizeequal to the size of one of the divided area of the paper (S405). Theimage-processing unit 107 reduces all the document images based on thecalculated scaling factor (S406).

The reduced document images are laid out according to the process shownin FIG. 24B. The process shown in FIG. 24B is similar to the processshown in FIG. 21B. The image-processing unit 107 identifies the area ofa sheet of paper dividing it into multiply areas (S407). If a documentimage selected from the reduced document image fits into a specificdivided area (S408: NO, or S411: NO), the document is laid out into thedivided area (S409). If the reduced document image does not fit into thespecific divided area (S411: YES) even after rotating the document image(S410), the area used for the document image is expanded (S412).Multiple document images to be laid out are laid out adjacent to eachother as much as possible. Similar process is repeated. When alldocument images are laid out (S43: YES), other image processes areexecuted (S414) to complete the image layout process.

FIG. 25 shows an example layout based on the process shown in FIG. 24Aand FIG. 24B. FIG. 25 shows an example where document images are laidout on A4 size paper in the portrait orientation. The process isexecuted on the memory 106. The document images shown in FIG. 25 consistof the first document image of the A4 size in the landscape orientation,the second document image of the A3 size in the landscape orientation,the third document image of the A3 size in the portrait orientation, thefourth document image of the A4 size in the portrait orientation, andthe fifth document image of the A5 size in the portrait position. FIG.23 shows a case where an area obtained by bisecting the sheet of paperinto two equal parts is assigned as the standard print area.

First, it is detected that the size of the largest document image amongthe document images to be printed is the A3 size based on the output ofthe document status detection sensor 103. The size of the largestdocument image detected is compared with the size of the area obtainedby dividing the paper into two equal parts. The scaling factor iscalculated in such a way as to make the size of the largest documentimage (i.e., A3) to be the A5 size (i.e., the size of the area obtainedby dividing the A4 size paper into two equal parts). Therefore, thescaling factor becomes 0.5.

The image-processing unit 107 reduces the entire document images basedon the calculated scaling factor 0.5. The size of the reduced firstdocument image is A6. Therefore, the first document image is rotated andlaid out into a quadrant area. The size of the reduced second documentimage is A5. Therefore, the reduced second document image does not fitinto the quadrant area. As a result, the area to be used for layout isexpanded from a quadrant area to a bisection area. The reduced seconddocument is laid out in a bisection area. The size of the reduced thirddocument is A5. Therefore, the reduced third document image is rotatedand laid out in a bisection area. The size of the reduced fourthdocument image is A6. Therefore, the reduced fourth document image islaid out in the quadrant area adjacent to the third document image. Thesize of the reduced fifth document is A7. Therefore, the reduced fifthdocument image can fit into an octant area. However, since the maximumdivision number M=4, the layout to an octant area is not considered.Therefore, the fifth document image is laid out into a quadrant areaadjacent to the fourth document image.

If the digital copying machine described above is used as a printer,processes similar to the image layout processes described above can beexecuted. This point is the same as in the first embodiment. The imagelayout processes can be executed on either the printer drivers of theclients 30 a through 30 d, the print server 30, or the digital copyingmachine 100. Since the processes are the same in the processes describedreferencing FIG. 16A, FIG. 16B, FIG. 17, and FIG. 18 for the firstembodiment, the detailed descriptions are not repeated here.

Although the above descriptions were based on the assumption of a singlesided printing as a part of the copying or printing condition, the imagelayout processes of this embodiment apply to cases where the double sideprinting is specified as well. In such cases, the print areas exist bothon the front and back sides of the paper.

The scaling factor is calculated in such a way as to make the size ofthe largest document size match with the size of the print area, and allthe document images are scaled up or down according to the scalingfactor. The method of laying out the scaled document images on the areasof the paper are not limited to the processes shown in FIGS. 21A, 21B,24A and 24B.

For example, it is possible to combine the process of the firstembodiment and the process of the second embodiment. Specifically, thesize of the largest document image is detected according to the processof the second embodiment. The scaling factor is calculated to make thesize of the largest document image match with the size of the print area(for example, the entire area of the paper). All the documents will bescaled up or down based on the calculated scaling factor. The scaleddocument images are laid out in sequence in the area of the paperaccording to the process of the first embodiment. In other words, thescaled document images are processed in such a way as to be printed outadjacent to each other. At this point, an area that is not yet assignedwith document images, i.e., an unassigned area is identified. It is thenjudged whether any document image can be laid out in the unassignedarea. If it is judged that it is possible to do so as a result of thejudgment, as many document images as possible are laid out adjacent toeach other.

In the present embodiment, the size of the largest document image isdetected among multiple document images, the scaling factor iscalculated to make the detected maximum size be the size of the printarea, and the multiple document images are scaled up or down based onthe calculated scaling factor. Thus, image loss can be prevented and acommon scaling factor can be used for the multiple document images.Consequently, the uniformity of the character font size is achievedmaking the printed materials easier to read. These effects can also beachieved in case the N-in-1 printing is not executed, in other words,one page portion of the document image is printed on one sheet of paper.The process of this embodiment is advantageous compared to the simple“fit-to-paper” process in that the common scaling factor can be used forall the document images.

Third Embodiment

In the third embodiment of the invention, the size of each documentimage is detected, and a scaling factor is calculated for each documentimage to make the size of the particular document image to match thesize of a print area, which is obtained by equally dividing the paperinto a prescribed number of sections. Each document image is then scaledup or down based on the calculated scale factor. The print area in thethird embodiment is an area obtained by equally dividing the paper intoa prescribed number of sections.

More specifically, the process according to this embodiment executes theN-in-1 printing without requiring a change in the orientation of thedocument image if the N-in-1 printing is specified and if it isidentified that the document images of various sizes are included in theimage data. In other words, the scaling factor is calculated in such away as to fit the particular document in the specified print areawithout losing any image and without requiring a change in theorientation of the document image. More specifically, the scaling factorfor a document image arbitrarily selected from multiple document imagesis calculated in the following manner. First, the system identifies thelength of the longer side of the document image. Next, it identifies thelength of the print area parallel to the longer side of the documentimage, which is to be fitted into the printing area. It then calculatesthe ratio between the length of the longer side of the selected documentimage and the above-mentioned length of the print area. It furthercalculates the scaling factor that causes the selected document image tofit into the print area. It finally lays out each scaled document imageinto a print area maintaining the original orientation.

The third embodiment is different from the first and the secondembodiments in the contents of the document image layout process.However, it is the same as the first embodiment except the contents ofthe document image layout process. The same component numbers are usedfor the components identical to those of the first embodiment.

The contents of the image layout process unique to the third embodimentwill be described below.

FIG. 26 shows the process of this embodiment when the 2-in-1 printing isspecified. If the 2-in-1 printing is specified, each area obtained bydividing a sheet of paper into two equal segments is the print area. Oneof the scaled document images is laid out into each print area.

FIG. 26(A) shows the entire area of a sheet of paper. The area of thissheet of paper is of a rectangular shape comprising the vertical sidewith a length of x (x being a constant) and the horizontal side with alength of √{square root over (2)}x. The orientation of this paper islandscape. When the 2-in-1 printing is specified, two print areas, 2 aand 2 b, are produced by dividing the paper into two sections at themidpoint of the longer side. The areas 2 a and 2 b created by equallydividing the paper into two sections have the vertical side of a lengthx and the horizontal side √{square root over (2)}x/2. The orientation ofthe print areas 2 a and 2 b is portrait.

FIG. 26(B) shows the process of scaling down the document image in theportrait orientation and laying it out in the print area 2 a. Thedocument image has a length of √{square root over (2)}x in the verticaldirection and x in the horizontal direction. Therefore, the length ofthe longer side of the original document is √{square root over (2)}x,which is the length in its vertical direction. Also, the length of thelonger (i.e., vertical) side of the print area 2 a is x. The ratiobetween the length of the longer side of the document image, √{squareroot over (2)}x, and the length of the print area 2 a parallel to thelonger side of the document image, which is x, is calculated. A scalefactor is then calculated based on the result of the calculation. Inreality, the scale factor is calculated in such as way as to make thelength of the longer side of the document image equal or smaller thanthe length of the print area 2 a parallel to the longer side of thedocument image. From the standpoint of preventing the character fontfrom becoming too small as much as possible, the scaling factor iscalculated to make the length of longer side of the document image matchwith the length of the print area 2 a parallel to the longer side of thedocument image. As a result, the scaling factor thus calculated is1/√{square root over (2)} (=about 0.707). The document image is scaledto about 0.707 times of its original size and laid out in the area 2 aof the paper maintaining the original orientation of the document image.

FIG. 26(C) shows the process of scaling down the document image in thelandscape orientation. The document image has a length of x in thevertical direction and √{square root over (2)}x in the horizontaldirection. Therefore, the length of the longer side of the documentimage is the length in the horizontal direction and is √{square rootover (2)}x. The length of the print area 2 a in the direction parallelto the longer side of the document image (i.e., horizontal direction) is√{square root over (2)}x/2. The ratio between the length of the longerside of the document image √{square root over (2)}x and the length ofthe print area 2 a parallel to the longer side of the document image,i.e., √{square root over (2)}x/2, is calculated. The scaling factor ofthis document image is calculated based on the resultant ratio. Inreality, the scale factor is calculated in such as way as to make thelength of the longer side of the document image equal or smaller thanthe length of the longer side of the print area 2 a. From the standpointof preventing the character font from becoming too small as much aspossible, the scaling factor is calculated to make the length of longerside of the document image match with the length of the print area 2 aparallel to the longer side of the document image. As a result, thescaling factor thus calculated is ½ (=0.5). The document image is scaledto 0.5 times of its original size and laid out in the area 2 a of thepaper maintaining the original orientation of the document image.

FIG. 27 shows the process of this embodiment when the 4-in-1 printing isspecified. If the 4-in-1 printing is specified, each area obtained bydividing a sheet of paper into four equal segments is the print area. Ascaling factor is calculated for each document image.

FIG. 27(A) shows the entire area of a sheet of paper. The area of thissheet of paper is of a rectangular shape comprising the vertical sidewith a length of x (x being a constant) and the horizontal side with alength of √{square root over (2)}x. The orientation of this paper islandscape. When the 4-in-1 printing is specified, four print areas, 4 a,4 b, 4 c and 4 d, are produced by equally dividing the paper into foursections. The areas 4 a, 4 b, 4 c and 4 d created by equally dividingthe paper into four sections have the vertical side of a length x/2 andthe horizontal side √{square root over (2)}x/2. The orientation of theseprint areas is landscape. One each of the scaled document images is laidout into each of these areas 4 a, 4 b, 4 c and 4 d.

FIG. 27(B) shows the process of scaling down the document image in theportrait orientation and laying it out in the print area 4 a. Thedocument image has a length of √{square root over (2)}x in the verticaldirection and x in the horizontal direction. Therefore, the length ofthe longer side of the document image is the length in the verticaldirection, which is √{square root over (2)}x. Also, the length of theprint area 4 a in the direction parallel to the longer side of thedocument image (i.e., vertical direction) is x/2. The ratio between thelength of the longer side of the document image √{square root over (2)}xand the length of the print area 4 a parallel to the longer side of thedocument image, i.e., x/2, is calculated. The scaling factor of thisdocument image is calculated based on the resultant ratio. In reality,the scale factor is calculated in such as way as to make the length ofthe longer side of the document image equal or smaller than the lengthof the longer side of the print area 4 a. From the standpoint ofpreventing the character font from becoming too small as much aspossible, the scaling factor is calculated to make the length of longerside of the document image match with the length of the print area 4 aparallel to the longer side of the document image. As a result, thescaling factor thus calculated is ½√{square root over (2)} (=about0.353). The document image is scaled to 0.353 times of its original sizeand laid out in the area 4 a of the paper maintaining the originalorientation of the document image.

FIG. 27(C) shows the process of scaling down the document image in thelandscape orientation into the print area 4 a. The document image has alength of x in the vertical direction and √{square root over (2)}x inthe horizontal direction. Therefore, the length of the longer side ofthe document image is the length in the horizontal direction and is√{square root over (2)}x. The length of the print area 4 a in thedirection parallel to the longer side of the document image (i.e.,horizontal direction) is √{square root over (2)}x/2. The ratio betweenthe length of the longer side of the document image √{square root over(2)}x and the length of the print area 4 a parallel to the longer sideof the document image, i.e., √{square root over (2)}x/2, is calculated.The scaling factor of this document image is calculated based on theresultant ratio. In reality, the scale factor is calculated in such asway as to make the length of the longer side of the document image equalor smaller than the length of the longer side of the print area 4 a.From the standpoint of preventing the character font from becoming toosmall as much as possible, the scaling factor is calculated to make thelength of longer side of the document image match with the length of theprint area 4 a parallel to the longer side of the document image. As aresult, the scaling factor thus calculated is ½ (=0.5). The documentimage is scaled to 0.5 times of its original size and laid out in thearea 4 a of the paper maintaining the original orientation of thedocument image.

As described above, the system calculates the ratio between the lengthof the longer side of the document image and the length of the area onthe paper, where the document image is laid out, in the directionparallel to the longer side of the document image. The document image isscaled based on the resultant ratio. This series of operation isrepeated for each document image. As a result, even in case the N-in-1printing is executed for multiple document images of various sizes, itis possible to prevent image losses and lay out the document imagesmaintaining their original orientations. Therefore, the user can readthe printed matters easily without having to rotate the printed matters.

Furthermore, in case the N-in-1 printing is specified and the paper tobe printed, the print areas obtained by equally dividing them, andmultiple document items are all rectangular shapes having a ratio of√{square root over (2)}:1 between the longer side and the shorter side,the scaling factor for each document image can be calculated easily.Specifically, the scale factor for each document image can be calculatedfor the size and orientation of the paper, the size and orientation ofthe document image, and the number of document images to be laid out ona sheet of paper, i.e., the number of divisions N.

In case the N-in-1 printing is to be executed and print areas are to beset up by equally dividing a sheet of paper having a ratio of √{squareroot over (2)}:1 between the longer side and the shorter side into Nsections having similar shapes as the paper, a relation N=2 n (n being apositive integer), i.e., N=2, 4, 8, 16, . . . , must hold. The scalingprocess for N=2, 4, 8, 16, . . . , will be described below.

When N=2, in other words, in case of the 2-in-1 printing, thecalculation process for the scaling factor is as follows. If theorientations of the document image and the paper are different, thedocument image is scaled in such a way that the area of the scaleddocument image becomes smaller than the size of the print area 2 aobtained by dividing a sheet of paper as shown in FIG. 26(B). On theother hand, if the orientations of the document image and the paper areequal, the document image is scaled in such a way that the area of thescaled document image becomes smaller than a half of the size of theprint area 2 a obtained by dividing a sheet of paper as shown in FIG.26(C).

Applying this process to the N-in-1 printing by generalizing it, thescaling factor can be calculated simply as follows.

In case the N-in-1 printing is to be executed where N is an odd numberpower of 2, the scaling factor can be calculated by means of thefollowing process. If the orientation of the document image is differentfrom the orientation of the paper, the scaling factor for the particulardocument image is calculated in such a way that the size of the scaleddocumentation image is smaller than the size of the print area obtainedby equally dividing the paper into N subsections. On the other hand, ifthe orientation of the document image and the orientation of the paperare equal, the scaling factor is calculated in such a way that the sizeof the scaled documentation image is smaller than a half of the size ofthe print area.

In case the N-in-1 printing is to be executed where N is an even numberpower of 2, the scaling factor can be calculated by means of thefollowing process. If the orientation of the document image is differentfrom the orientation of the paper, the scaling factor for the particulardocument image is calculated in such a way that the size of the scaleddocumentation image is smaller than a half of the size of the print areaobtained by equally dividing the paper into N subsections. On the otherhand, if the orientation of the document image and the orientation ofthe paper are equal, the scaling factor is calculated in such a way thatthe size of the scaled documentation image is smaller than the size ofthe print area.

Examples of image layout processes will be described below referring toflowcharts where the processes are executed based on the size andorientation of the paper, the size and orientation of the documentimage, and the number of document images to be laid out on a sheet ofpaper.

FIG. 28A and FIG. 28B show a flowchart of an image layout processaccording to the third embodiment of the invention. The image layout ofthis embodiment can be executed on the memory 106 similar to those forthe first and second embodiments.

The CPU 109 refers to the copying condition stored on the control datamemory part 16 b (S501). As a result of the reference, a judgment ismade whether the N-in-1 printing is to be executed (S502). If it isjudged that the execution of the N-in-1 printing is not specified as aresult of the reference (S502: NO), it goes to RETURN immediately. Theprint area is obtained by equally dividing the paper into N subsections,i.e., equal parts. The operating panel instructs the division number N.i.e., the number of the equal parts.

If the N-in-1 printing is specified (S502: YES), the data concerning thesize and orientation of the paper stored in the control data memory part16 b as a part of the copying condition is referred to. As a result, thesize and orientation of the paper is identified (S503). If theinstruction for the paper size is not included in the copying condition,the size of the document image obtained by scanning it can be used asthe size of the paper. Next, a document image is selected from the setof multiple document images. The size and orientation of the selecteddocument image are detected by referring to the control data memory part16 b (S504).

A judgment is made, in FIG. 28B that follows, whether the number N(division number), which is the number of the document images to be laidout on a sheet of paper, is an odd number power of 2 (S505). Forexample, if the 2-in-1 printing, 8-in-1 printing, etc., are specified,it is judged that N is an odd number power of 2 (S505: YES). On theother hand, if the 4-in-1 printing, 16-in-1 printing, etc., arespecified, it is judged that N is an even number power of 2 (S505: NO).

Next, the orientation of the paper is compared with the orientation ofthe document image to calculate the scaling factor for scaling thedocument images. If the number N of document images to be laid out on asheet of paper is an odd number power of 2 (S505: YES), and theorientation of the paper is landscape, i.e., horizontal (S506: YES)while the orientation of the document image is portrait, i.e., vertical(S507: NO) or the orientation of the paper is portrait (S506: NO) whilethe orientation of the document image is landscape (S508: YES), thescaling factor is calculated in such a way as to make the size of thescaled document image be 1/N times of the size of the paper (S509). Onthe other hand, the orientations of both the paper and the documentimage are portrait (S506: YES and S507: YES), or the orientations ofboth the paper and the document image are landscape (S506: NO and S508:NO), the scaling factor is calculated in such a way as to make the sizeof the scaled document image be 1/2N times of the size of the paper(S510). In other words, if N is an odd number power of 2 and theorientation of the paper is different from the orientation of thedocument image, the scaling factor is calculated in such a way as tomake the size of the scaled document image be equal to the size of anarea obtained by equally dividing the paper into N segments, while ifthe orientation of the paper is the same as the orientation of thedocument image, the scaling factor is calculated in such a way as tomake the size of the scaled document image be equal to a half the sizeof an area obtained by equally dividing the paper into N segments.

If the division number N is an even number power of 2 (S505: NO), and ifthe orientations of both the paper and the document image are landscape(S511: YES and S508: YES), or the orientations of both the paper and thedocument image are portrait (S511: NO and S507: NO), the scaling factoris calculated in such a way as to make the size of the scaled documentimage be 1/N times of the size of the paper (S509). On the other hand,the orientation of the paper is landscape (S511: YES) while theorientation of the document image is portrait (S508: NO) or theorientation of the paper is portrait (S511: NO) while the orientation ofthe document image is landscape (S507: YES), the scaling factor iscalculated in such a way as to make the size of the scaled documentimage be 1/2N times of the size of the paper (S510). In other words, ifN is an even number power of 2 and the orientation of the paper is thesame as the orientation of the document image, the scaling factor iscalculated in such a way as to make the size of the scaled documentimage be equal to the size of an area obtained by equally dividing thepaper into N segments, while if the orientation of the paper isdifferent from the orientation of the document image, the scaling factoris calculated in such a way as to make the size of the scaled documentimage be equal to a half the size of an area obtained by equallydividing the paper into N segments.

As described above, the document image is scaled based on the calculatedscaling factor (S512). One each of the scaled document images is laidout in each print area (S513).

It is preferable that each scaled document image is printed in themiddle of each print area. More specifically, it is possible to lay outthe scaled document image to cause the center of the scaled documentimage to align with the center of the area of the paper. As a result,the eccentric positioning of the scaled document image can be preventedand the document image is located in a neat and easily viewable fashion.

When it is judged that all document images are laid out (S514: YES),other image processes such as, spacing, will be done (S515). Thisconcludes the document layout process.

FIG. 29, FIG. 30 and FIG. 31 show the example layouts based on theprocess shown in FIG. 28A and FIG. 28B. FIG. 29 shows the process oflaying out document images on A4 size, landscape position paper. Thedocument images shown on FIG. 29 consist of the first document image ofthe A4 size in the portrait orientation, the second document image ofthe A3 size in the portrait orientation, the third document image of theA4 size in the landscape orientation, and the fourth document image ofthe A3 size in the landscape orientation.

FIG. 29 describes an image layout case where the 2-in-1 printing isexecuted. Therefore, the number N of the document images laid out on asingle sheet of paper is 2 and N is an odd number power of 2. The sizeof the print area is A5 as the area obtained by equally dividing thepaper into two sections.

The orientation of the first document image is portrait and is differentfrom the orientation of the paper. Therefore, the scaling factor iscalculated to be 0.707 to make the size of the first document image,which is A4, be equal to the size of the print area. The first documentis scaled according to this calculated scaling factor. The reduced firstdocument image is laid out in the left side print area of the firstsheet of paper maintaining the original orientation. The orientation ofthe second document is portrait and is different from the orientation ofthe paper. Therefore, the scaling factor is calculated to be 0.5 to makethe size of the first document image, which is A3, be equal to the sizeof the print area. The second document is scaled according to thiscalculated scaling factor, 0.5. The reduced second document image islaid out in the right side print area of the first sheet of papermaintaining the original orientation. Thus, the first and seconddocument images can be laid out without losing any portion of the imagesand maintaining their original orientations.

Similarly, the orientation of the third document image is landscape andcoincides with the orientation of the paper. Therefore, the scalingfactor is calculated to be 0.5 to make the size of the third documentimage, which is A4, be equal to a half the size of the print area, i.e.,A6. The third document is scaled according to this calculated scalingfactor, 0.5. The reduced third document image is laid out in the leftside print area of the second sheet of paper maintaining the originalorientation. The orientation of the fourth document image is landscapeand coincides with the orientation of the paper. Therefore, the scalingfactor is calculated to be 0.353 to make the size of the fourth documentimage, which is A3, be equal to a half the size of the print area, i.e.,A6. The fourth document is scaled according to this calculated scalingfactor, 0.353. The reduced fourth document image is laid out in theright side print area of the second sheet of paper maintaining theoriginal orientation. These reduced document images are laid out in sucha way that the centers of the reduced document images align with thecenters of the areas where they are laid out.

FIG. 30 shows the process of laying out document images on A4 size,landscape position paper. The document images shown on FIG. 30 consistof the first document image of the A4 size in the portrait orientation,the second document image of the A3 size in the portrait orientation,the third document image of the A4 size in the landscape orientation,and the fourth document image of the A3 size in the landscapeorientation. FIG. 30 describes an image layout case where the 2-in-1printing is executed. Therefore, the number N of the document imageslaid out on a single sheet of paper is 2 and N is an odd number power of2. The size of the print area is A5 as the area obtained by equallydividing the paper into two sections.

The orientation of the first document image is portrait and coincideswith the orientation of the paper. Therefore, the scaling factor iscalculated to be 0.5 to make the size of the first document image, whichis A4, be equal to a half the size of the print area. The first documentis scaled according to this calculated scaling factor. The reduced firstdocument image is laid out in the upper half of the print area of thefirst sheet of paper maintaining the original orientation. Theorientation of the second document is portrait and coincides with theorientation of the paper. Therefore, the scaling factor is calculated tobe 0.353 to make the size of the second document image, which is A3, beequal to a half the size of the print area. The second document isreduced according to this calculated scaling factor. The reduced seconddocument image is laid out in the bottom half of the print area of thefirst sheet of paper maintaining the original orientation. Theorientation of the third document image is landscape and is differentfrom the orientation of the paper. Therefore, the scaling factor iscalculated to be 0.707 to make the size of the third document image,which is A4, be equal to the size of the print area. The third documentis reduced according to this calculated scaling factor. The reducedthird document image is laid out in the upper half of the print area ofthe second sheet of paper maintaining the original orientation. Theorientation of the fourth document image is landscape and is differentfrom the orientation of the paper. Therefore, the scaling factor iscalculated to be 0.707 to make the size of the fourth document image,which is A3, be equal to the size of the print area. The fourth documentis reduced according to this calculated scaling factor, 0.707. Thereduced fourth document image is laid out in the bottom half of theprint area of the second sheet of paper maintaining the originalorientation.

FIG. 31 shows the process of laying out document images on A4 size,landscape position paper. The document images shown on FIG. 31 consistof the first document image of the A4 size in the portrait orientation,the second document image of the A3 size in the portrait orientation,the third document image of the A4 size in the landscape orientation,and the fourth document image of the A3 size in the landscapeorientation. Therefore, the number N of the document images laid out ona single sheet of paper is 4 and N is an even number power of 2. Thesize of the print area is A6 as the area obtained by equally dividingthe paper into two sections.

The orientation of the first document image is portrait and is differentfrom the orientation of the paper. Therefore, the scaling factor iscalculated to be 0.353 to make the size of the first document image,which is A4, be equal to a half the size of the print area, i.e., A7.The first document is scaled according to this calculated scalingfactor. The reduced first document image is laid out in the left uppercorner of the print area of the first sheet of paper maintaining theoriginal orientation. The orientation of the second document is portraitand is different from the orientation of the paper. Therefore, thescaling factor is calculated to be 0.25 to make the size of the seconddocument image, which is A3, be equal to a half the size of the printarea, i.e., A7. The second document is reduced according to thiscalculated scaling factor. The reduced second document image is laid outin the bottom left corner of the print area of the first sheet of papermaintaining the original orientation. The orientation of the thirddocument image is landscape and coincides with the orientation of thepaper. Therefore, the scaling factor is calculated to be 0.5 to make thesize of the third document image, which is A4, be equal to the size ofthe print area, i.e., A6. The third document is reduced according tothis calculated scaling factor. The reduced third document image is laidout in the upper right corner of the print area of the second sheet ofpaper maintaining the original orientation. The orientation of thefourth document image is landscape and coincides with the orientation ofthe paper. Therefore, the scaling factor is calculated to be 0.353 tomake the size of the fourth document image, which is A3, be equal to thesize of the print area, i.e., A6. The fourth document is reducedaccording to this calculated scaling factor. The reduced fourth documentimage is laid out in the bottom right corner of the print area of thesecond sheet of paper maintaining the original orientation. Thus, thefirst, second, third and fourth document images are synthesized to forma new output document data.

As seen in the above, the embodiment provides a means of imageprocessing where multiple document images are laid out maintaining theiroriginal orientations, making it easier to view them. It also preventsmultiple document images of various sizes from losing any part thereofeven when they are being processed for the N-in-1 printing.

Furthermore, as indicated in a flowchart of FIG. 28, the scaling factorcan be easily calculated by means of considering those points as whetherthe number N of documents that are laid out on a sheet of paper is anodd number power of 2 and whether the orientation of the paper coincidewith the orientation of the document image.

A similar image process can be executed when the digital copying is usedas a printer. This is the same as in the first and second embodiments.The image layout process can be executed on any of the printer driversof the clients 30 a through 30 d, the print server 30, or the digitalcopying machine 100. Since the processes in this case are similar tothose described using the FIGS. 16A, 16B, 17, and 18 of the firstembodiment, detailed descriptions are not repeated here. FIG. 32 showsan example of the printer driver's display screen in the thirdembodiment of the invention.

As described in the above, the image processing according to thisembodiment provides a means of detecting the size of each documentimage, calculating the scaling factor in order to match the size of eachdetected document image with the size of a print area obtained byequally dividing the paper, and scaling the size of each document imagebased on each calculated scaling factor. Therefore, it is capable ofpreventing multiple document images of various sizes from losing anypart thereof even when they are being processed for the N-in-1 printing.It is also capable of printing out those document images maintainingtheir original orientations. Therefore, the user can read the printedmatters without rotating them.

Although the first, second and third embodiments were described in theabove using as an example a network image forming system, which is acompound machine with copying and printing capabilities comprising thedigital copying machine 100 and the print server 20, the invention isnot to be construed to be limited by such a structure. The presentinvention is equally applicable to a digital copying machine which is adedicated copying machine, a printer which is a dedicated printingmachine, a digital facsimile machine, or a print server.

It is possible to start actual printing on paper after preparing theoutput image data for all pages, or, alternatively, prepare the outputimage data for the succeeding pages while printing based on the outputimage data for pages for which image layouts have been completed.

The process according to the present invention can be performed byexecuting the procedure shown in FIGS. 10, 12, 19, 21, 24, 26, 28 and 31by means of the CPU 109, 21 and 31. It is also possible to provide thesespecific programs by computer readable means (e.g., floppy disk, CD ROM,etc.). These programs can be provided as application software forexecuting the process or being built into the digital copying machine100 or the print server 20 as a function. Such a program can also bebuilt into printer drivers installed on the clients 30 a through 30 d.The computer program product includes a program itself, a memory mediumthat stores the program, and an apparatus where the program is installedto operate it.

1. An image forming apparatus comprising: a receiving unit for receivingan individual print job from an external device, the print jobcomprising print data representing images of multiple pages of varioussizes; a detecting unit for detecting a maximum size of the multiplepages; a selecting unit for selecting a paper size that is equal to orlarger than the detected maximum size; and a forming unit for formingall of the images represented by the individual print job on papers ofthe selected paper size.
 2. An image forming apparatus comprising: areceiving unit for receiving an individual print job from an externaldevice, the print job comprising print data representing images ofmultiple pages of various sizes; a detecting unit for detecting amaximum size of the multiple pages; a calculating unit for calculatingmagnification ratio on the basis of the detected maximum size and apaper size of papers on which the images of the multiple pages are to bereproduced; and a processing unit for processing the print data of eachof the images based on the magnification ratio calculated by thecalculating unit; and an image forming unit that forms magnified images,on the basis of the processed image data on the papers of the size.